package com.thermofisher.dsc.amanda.common.excel.scheduled;

import java.util.concurrent.Executors;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.SchedulingConfigurer;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;

/**
 * Created by wenjie.yang on 4/3/2019.
 */
@Configuration
public class SpringScheduledConfig implements SchedulingConfigurer {


  @Override
  public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
    //设定一个长度10的定时任务线程池
    taskRegistrar.setScheduler(Executors.newScheduledThreadPool(10));
  }



}
